package school.community.mapper;

import school.community.dto.InfoQueryDTO;
import school.community.model.Info;
import school.community.model.Question;

import java.util.List;

public interface InfoExtMapper {
    int incView(Info record);

    int incCommentCount(Info record);

    List<Info> selectRelated(Info info);

    Integer countBySearch(InfoQueryDTO infoQueryDTO);

    List<Info> selectBySearch(InfoQueryDTO infoQueryDTO);

    List<Info> selectByState(InfoQueryDTO infoQueryDTO);

    Integer countByState(InfoQueryDTO infoQueryDTO);

    /**
     * 插入数据并返回自增ID
     * @param info
     */
    void insertAndReturnId(Info info);
}